package com.fun.feifun.modules.business.model.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class BusinessOrderPage implements Serializable  {

    @ApiModelProperty(value = "充值目标账号")
    private String rechargeAccount;

    @ApiModelProperty(value = "订单编号")
    private String code;

    @ApiModelProperty(value = "商品编码")
    private String goodsCode;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "用户编码")
    private String businessUserCode;

    @ApiModelProperty(value = "用户名称")
    private String businessUserNike;

    @ApiModelProperty(value = "供货商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供货商名称")
    private String supplierName;

    @ApiModelProperty(value = "备注")
    private String remake;

    @ApiModelProperty(value = "支付状态 ")
    private Integer payState;

    @ApiModelProperty(value = "订单状态 ")
    private Integer state;

    @ApiModelProperty(value = "订单创建时间区间")
    private List<String> createTimeRange;

    @ApiModelProperty(value = "回单时间区间")
    private List<String> returnTimeRange;

    @ApiModelProperty(value = "商品经销商")
    private Integer goodsOperators;

    @ApiModelProperty(value = "页码")
    private int page=1;

    @ApiModelProperty(value = "分页数量")
    private int size=10;

    @ApiModelProperty(value = "排序字段")
    private String sort="id";

    @ApiModelProperty(value = "排序类型")
    private boolean isASC=true;

    public int getSize() {
        if(size==0)
            return 10;
        return size;
    }
    public int getPage() {
        if(page==0)
            return 1;
        return page;
    }
}
